package com.itany.corejava.day06;

public class Room {
    private String no;
    private Customer customer;
    private boolean status;

    public Room(String no) {
        this.no = no;
        customer=null;
        status=false;
    }


    public boolean in(Customer customer){
        this.customer=customer;
        status=true;
        return true;
    }

    public boolean out(){
        this.customer=null;
        status=false;
        return true;
    }


    @Override
    public String toString() {
        return String.format("%4s",true==status?customer.toString():"空房");
    }











    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }
}
